import { get, post, put, deleteApi, deleteOne } from '@/utils/api'

export function rightOptions() {
    return get('/admin/rights/options')
}

export function rightEffectiveOptions(roleId) {
    return get(`/admin/rights/effective/options/${roleId}`)
}

export function pageQuery(queryParams) {
    return get('/admin/rights/page', queryParams)
}

export function insert(data) {
    return post('/admin/rights', data)
}

export function update(data) {
    return put('/admin/rights', data)
}

export function deleteData(ids) {
    return deleteApi('/admin/rights', ids)
}

export function deleteOneRow(id) {
    return deleteOne(`/admin/rights/${id}`)
}